package cn.ww.conf;

import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class Test {

    public static void main(String[] args) {
        List<String> names = Arrays.asList("peter", "anna", "mike", "xenia");

        /*Collections.sort(names, new Comparator<String>() {
            @Override
            public int compare(String a, String b) {
                return b.compareTo(a);
            }
        });*/
        Collections.sort(names, (a, b) ->  b.compareTo(a));
        Collections.sort(names, (String a, String b) -> b.compareTo(a));
        Collections.sort(names, (a, b) -> b.compareTo(a));
        for (String string : names) {
            System.out.println(string);
        }
        new Comparator() {

            @Override
            public int compare(Object o1, Object o2) {
                // TODO Auto-generated method stub
                return 0;
            }
            
        }; 
        
    }

}
